home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Snippets / AOCE / DragBusinessCard / SimpleDrag.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-11  |  3.1 KB  |  115 lines  |  [TEXT/MPS ]

  1. /*
  2.  *  SimpleDrag.h     Drag Manager sample program header
  3.  *
  4.  *  v 1.0d2  7/93 Greg Robbins
  5.  *
  6.  */
  7.  
  8.     
  9. #include <QuickDraw.h>
  10. #include <StandardFile.h>
  11. #include <Fonts.h>
  12. #include <Menus.h>
  13. #include <Dialogs.h>
  14. #include <Events.h>
  15. #include <TextEdit.h>
  16. #include <OSEvents.h>
  17. #include <Desk.h>
  18. #include <AppleEvents.h>
  19. #include <GestaltEqu.h>
  20. #include <ToolUtils.h>
  21. #include <Processes.h>
  22. #include <Errors.h>
  23. #include <Drag.h>
  24. #include <Memory.h>
  25. #include <String.h>
  26.  
  27. #ifdef THINK_C
  28. #include <BDC.h>
  29. #else
  30. #include <Packages.h>
  31. #endif
  32.     
  33.  
  34. #include <OCE.h>
  35. #include <OCEAuthDir.h>
  36. #include <OCEMessaging.h>
  37. #include <OCEErrors.h>
  38. #include <OCEStandardMail.h>
  39. #include <OCEStandardDirectory.h>
  40.  
  41.  
  42. // function prototypes
  43.  
  44. pascal OSErr DoAEOpenApplication(AppleEvent *, AppleEvent *, long refCon);
  45. pascal OSErr DoAEOpenDocuments(AppleEvent *, AppleEvent *, long refCon);
  46. pascal OSErr DoAEQuitApplication(AppleEvent *, AppleEvent *, long refCon);
  47. void DoHighLevelEvent(EventRecord *);
  48. OSErr InstallAppleEventHandlers(void);
  49. void DrawWindow(WindowPtr);
  50. PicHandle GetWindowPicture(WindowPtr);
  51. OSErr SetWindowPicture(WindowPtr, PicHandle);
  52. OSErr SetEmptyWindowPicture(WindowPtr);
  53. OSErr SetWindowPictureFromFile(FSSpecPtr, WindowPtr);
  54. Boolean KeyIsDown(short);
  55. void ConcatPascalStrings(StringPtr, StringPtr);
  56. OSErr GetApplicationName(StringPtr);
  57. WindowPtr OpenPictureInNewWindow(FSSpecPtr);
  58. void DoOpen(void);
  59. WindowPtr DoNewWindow(void);
  60. void DoCloseWindow(WindowPtr);
  61. void DoQuit(void);
  62. WindowPtr DoAboutWindow(void);
  63. WindowPtr ReportErrorInWindow(WindowPtr, StringPtr, OSErr);
  64. WindowPtr ReportStringInWindow(WindowPtr, StringPtr);
  65. void CreateMenus(void);
  66. void DoMenuCommand(long);
  67. Boolean KeyIsDown(short);
  68. // routines to support dragging
  69.  
  70. Boolean MouseIsInContentRgn(DragReference, WindowPtr);
  71. Boolean DragItemsAreAcceptable(DragReference);
  72. Boolean DragIsNotInSourceWindow(DragReference);
  73. pascal OSErr MyTrackingHandler(DragTrackingMessage, WindowPtr,
  74.     void *, DragReference);
  75. pascal OSErr MyReceiveHandler(WindowPtr, void *, DragReference);
  76. OSErr InstallDragHandlers(WindowPtr theWindow);
  77. void RemoveDragHandlers(WindowPtr);
  78. void OutlineRegion(RgnHandle);
  79. OSErr DoWindowContentDrag(WindowPtr, EventRecord *);
  80.  
  81.  
  82. void ProcessEvents(void);
  83.  
  84. void DrawPhoneNumberAttribute(WindowPtr theWindow,
  85.                             AttributeValuePtr theAttrValue);
  86. void DrawNoPhoneNumberAttribute(void);
  87. OSErr GetIdentity(void);
  88. OSErr DoAuthentication(void);
  89.  
  90. OSErr GetAttributeFromRID ( RecordIDPtr             rid,
  91.                             short                     dsRefNum,
  92.                             const AttributeTypePtr     attributeType,
  93.                             AttributePtr             attributePtr,
  94.                             AuthIdentity             identity);
  95.  
  96. OSErr DoEnumerateGet(short        dsRefNum, 
  97.                      long         clientData,
  98.                      RStringPtr   recordType,
  99.                      AuthIdentity identity);
  100. void ClearMemory(
  101.         void                *recordPtr,
  102.         register Size        recordSize
  103.     );
  104.     
  105. OSErr OpenPersonalCatalog(
  106.         PackedRLIPtr                    rli,
  107.         short                            *dsRefNumPtr
  108.     );
  109.  
  110. OSErr GetRecordID( FSSpecPtr     fsspec,
  111.                    RecordIDPtr   ridPtr,
  112.                    RStringPtr    recordType);
  113.  
  114. void myReportStringInWindow(WindowPtr theWindow,
  115.                             StringPtr theString);